Ext.define('Admin.view.number.NumberDetailForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.numberDetailForm',
    requires: [
        'Ext.button.Button',
        'Ext.form.field.Text',
        'Ext.form.field.Checkbox',
        'Ext.form.field.ComboBox',
        'Ext.form.field.Date',
		'Ext.form.field.Time', 
        'Ext.form.field.Number',
        'Ext.form.field.Hidden',
        'Ext.form.field.Picker',
        'Ext.form.field.TextArea',
        'Ext.form.field.File',
        'Ext.form.field.HtmlEditor'
    ],
//因为Window是独立Create的并不属于NumberModelPanel主视图
//所以：必须绑定viewModel才可以刷新Grid数据
//所以：必须绑定ViewController才可以绑定事件
viewModel: {type: 'numberViewModel'},
controller: 'numberViewController',
    //cls: '',

    layout: {
        type:'vbox',
        align:'stretch'
    },

    bodyPadding: 10,
    scrollable: true,

    defaults: {
        labelWidth: 60,
        labelSeparator: ''
    },

    items: [{
        xtype: 'hidden',
        fieldLabel: 'id',
        name:'id',
		readOnly:true
    },{
        xtype: 'textfield',
        fieldLabel: '用户名',
        name:'userName',
        readOnly:true
    }, {
        xtype: 'textfield',
        fieldLabel: '真名',
        name:'realName',
        readOnly:true
    }, {
        xtype: 'textfield',
        fieldLabel: 'Email',
        name:'email',
        readOnly:true
	},{
        xtype: 'textfield',
        fieldLabel: '电话',
        name:'phone',
        readOnly:true
    },{
        xtype: 'textfield',
        fieldLabel: '性别',
        name:'sex',
        readOnly:true
    },{
        xtype: 'datefield',
        fieldLabel: '出生日期',
        name:'birthday',
        readOnly:true
    },{
        xtype: 'datefield',
        fieldLabel: '工作时间',
        name:'workTime',
        readOnly:true
    },{
        xtype: 'textfield',
        fieldLabel: '身份证号',
        name:'idcard',
        readOnly:true
    },{
        xtype: 'textfield',
        fieldLabel: '地址',
        name:'address',
        readOnly:true
    },{
        xtype: 'textfield',
        fieldLabel: '所属部门',
        name:'departmentName',
        readOnly:true
    }
    ],

    bbar: {
        overflowHandler: 'menu',
        items: ['->',
        {   xtype: 'button',
            ui: 'soft-red',
            text: '返回',
	        handler :function(bt){
			var win = bt.up('window');
		        if (win) {
		            win.close();
		        }
	        }
        },'->']
    }
});
